1. Field of the Invention
This invention relates to a machine tool with a tapping function.
2. Description of the Related Art
In giving a work various machining operations, it is currently known that threading is performed while the work is fixed. Conventionally, in performing threading on one end of the fixed work, a tapping operating using an attachment called "a tapper" and a rigid-type tapping operation, in which the amount of revolution (the number of revolutions) of a tap and the amount of axial feed (the feed speed) of the tap are synchronous with each other, are known. In the rigid-type tapping operation, tapping is thus performed with a mutual relationship between the number of revolutions of the tap and the axial position of the tap.
If the tap is to be moved axially while the spindle to which the tap is attached is rotated with respect to a fixed work, the tap is rotated, at a cutting speed designated for the work, due to the rotation of the spindle, so that the main spindle is moved axially so as to provide a designated pitch of tapping on the end surface of the work. In this case, the cutting speed of the tap with respect to the work is the rotating speed of the spindle.
After a thread has been cut to the bottom of the thread, the spindle is rotated in the reverse direction. The feed speed of the spindle in this reverse rotation is determined by the rotating speed and tapping pitch of the spindle, and the direction of feed is opposite to that of the previous rotation. As a result, the tap is retracted along the threaded surface to remove from the work, completing the rigid-type tapping operation,
In this conventional rigid-type tapping, a program to execute the tapping is created, and a numerical control of a numerically controlled machine tool is controlled by this program. Following is an example of control program to be used in the rigid-type tapping operation in which a tap having a diameter of 6 mm and a tapping pitch of 1.0 mm is formed on a fixed work by a tap rotating at 1,000 r.p.m.
M29 S1000; PA1 G84 Z**, * F1000; PA1 G80;
In this control program, the rigid tap mode is determined by the first code "M29" in "M29 S1000" of the first line, and the rotating speed of the spindle, which is the cutting speed of the tap, is set up to 1,000 r.p.m. by the next code "S1000". Then, the tapping operation is performed at a fixed cycle in a tapping cycle by the first code "G84" in "G84 Z**, * F1000" of the second line. The amount of feed in the direction of Z axis, which is the length of the thread to be cut, is determined by the second code "Z**, *", and the extent of axial feed of the tap is determined by "F1000". Then, the fixed cycle in the tapping cycle is canceled by the code "G80" of the third line to terminate the tapping operation.
Therefore, in the conventional rigid-type tapping operation, it is necessary to create a program which is composed of at least three lines for one threading operation. In creating this program, it is necessary that the feed speed F is obtained from the cutting conditions, i.e. the pitch P and the number of revolutions S, and is then set in the program.
Furthermore, in changing the cutting conditions, it is necessary that the feed speed F is obtained according to the change of the number of revolutions S, and is then set in the program, even if there is no change in the pitch P.
For example, if the pitch P is 1.0 and the number of revolutions S is 1,000 r.p.m., the feed speed F1000 is obtained by the calculation 1.0.times.1,000=1,000 and is then set in the program. At that time, if the number of revolutions S is changed to 1,500, the feed speed F1500 is obtained by the calculation 1.0.times.1,500=1,500 and is then set in the program.
Thus for the conventional rigid-type tapping operation, a program for the operation must be created. And in order to change the cutting conditions, it is necessary to calculate a set value based on the cutting conditions and to change the program by the set value.
In Japanese Non-examined Patent Publication No. 4-93114, there is disclosed a tapping machine for changing a number of revolution in accordance with a parameter stored in a memory.